﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;

namespace InControl
{
    public partial class Error_form : Form
    {
        private bool hidden;

        public Error_form()
        {
            InitializeComponent();
        }

        private void pictureBox4_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void richTextBox1_TextChanged(object sender, EventArgs e)
        {
                
        }

        private void richTextBox1_KeyP(object sender, System.Windows.Forms.KeyPressEventArgs e)
        {
            if (e.KeyChar == (char)13)
                this.Close();
        }


        private void Error_form_Load(object sender, EventArgs e)
        {
            if (!hidden)
            {

                hidden = true;

                HideCaret(richTextBox1.Handle);

            }

        }


        [DllImport("user32.dll", EntryPoint = "ShowCaret")]

        public static extern long ShowCaret(IntPtr hwnd);



        [DllImport("user32.dll", EntryPoint = "HideCaret")]

        public static extern long HideCaret(IntPtr hwnd);

    }
}
